<?php
/**
 * Created by Pako
 * Date: 2019/3/3
 * Time: 18:09
 */

namespace App\Repositories\Shop;


use App\Models\Product\TypeTemplate;
use App\Repositories\Repository;

class TemplateRepository extends Repository
{
    public function getTemplateById($template_ids)
    {
        if (!is_array($template_ids)) {
            $template_ids = explode(',', $template_ids);
        }

        $template = TypeTemplate::query()->whereIn('template_id', $template_ids)->get();
        return $this->respondWith($template);
    }
}